stage("cleanup"){
  delete @run
}

stage("depends"){
  #~ Product.new('test2', @logger).build
  #~ Product.new('test2', @logger).build
}

stage("build test2"){
  #~ dir = Product.get('test2', ['2008', '06', '10', '21', '47', '17'])
  dir = Product.build('test2')
  copy "#{dir}/main/*.*", '', true
}

stage('test'){
  puts "copy file to file"
  copy 'test.txt', 'test3.txt'
  puts "copy file to dir/file"
  copy 'test.txt', 'test_dir/test2.txt'
  puts "copy file to dir/dir/file"
  copy 'test2.txt', 'test_dir/ttt/test2___ss.txt'
  puts "copy file to dir/"
  copy 'test.txt', 'test_dir2/'
  puts "copy dir to dir/"
  copy 'test_dir', 'test_dir4/'
  puts "copy dir/*.* to dir/"
  copy 'test_dir/*.*', 'test_dir5/'
}

stage('test file list'){
  Dir.glob('test_dir/**/*.*').each{ |f|
    puts f
  }
}

stage('history'){
  historize_dir_content 'test_dir/ttt', 'bin/'
}
